-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent backend from crashing if no inspectionArea #2046
base: main
Are you sure you want to change the base?
Conversation
@@ -157,7 +157,7 @@ private async void OnSendRobotToDockTriggered(object? sender, RobotEmergencyEven | |||
{ | |||
await MissionScheduling.ScheduleMissionToDriveToDockPosition(robot.Id); | |||
} | |||
catch (DockException ex) | |||
catch (Exception ex) when (ex is DockException || ex is InspectionAreaNotFoundException) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do it, but the logging and behavior is the same so it would mean duplicated line 161-172. Do you prefer splitting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, we do this in the mapService as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The looging messages are different tho, one is regarding docking and the other inspection area so i think it is worth it to duplicate it, it is also consistent with most of the code we have. You don't have to because its a preference but for consistency i think it would be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this. Less chance of getting bugs where only one of the exceptions have forgotten a return or a signalR message
0d44f20
to
864b49e
Compare
864b49e
to
13166a6
Compare
Ready for review checklist: